home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: June 24, 1997
- // Author: ajp
- //
- //
- //<doc>
- //<name refreshAE>
- //<owner "Alias|Wavefront Unsupported">
- //
- //<synopsis>
- // refreshAE
- //
- //<returns>
- // None
- //
- //<description>
- // Refreshes the attribute editor. (Only if it's visible.)
- //
- //<flags>
- // None
- //
- //<examples>
- // refreshAE;
- //
- //</doc>
-
- global proc refreshAE()
- {
- global string $gAttributeEditorWindowName;
- global string $gAEBaseLayoutName;
- global string $gAETabLayoutName;
- global string $gAEFocusNode;
-
- if ( ( `window -exists $gAttributeEditorWindowName`
- && `window -q -vis $gAttributeEditorWindowName`)
- || (`isAttributeEditorVisible`))
- {
- // update the tabs
- if (`objExists $gAEFocusNode`) {
-
- // find out what tab is currently being viewed
- //
- string $tabLabels[] = `tabLayout -q -tl $gAETabLayoutName`;
- int $tabIndex = `tabLayout -q -sti $gAETabLayoutName`;
- string $currentTab = $tabLabels[$tabIndex-1];
-
- AEbuildAllTabs $gAEFocusNode;
-
- // check if the currentTab still exists
- $tabLabels = `tabLayout -q -tl $gAETabLayoutName`;
- for ($i = 0; $i < size($tabLabels); $i++) {
- if ($currentTab == $tabLabels[$i]) {
- tabLayout -e -st ("formTab"+$i) $gAETabLayoutName;
- return;
- }
- }
-
- // if we've gotten this far, currentTab no longer
- // exists, rebuild the AE and select $gAEFocusNode's tab
- //
- updateAE($gAEFocusNode);
-
- } else {
-
- // BUG #172131
- // In certain cases (like a curve on surface) $gAEFocusNode
- // does not exist but $gAEFocusNode stripped of '|' does.
- // Only make the formLayout invisible if neither $gAEFocusNode
- // nor $gAEFocusNode stripped of '|' exist.
- string $stripped = `substitute "|" $gAEFocusNode ""`;
- if ( !`objExists $stripped` )
- {
- formLayout -e -visible false $gAEBaseLayoutName;
- }
-
- if (`window -exists $gAttributeEditorWindowName`)
- {
- window -e
- -title ("Attribute Editor")
- $gAttributeEditorWindowName;
- }
-
- }
- }
- }
-